/*
 * @Author: SimonCK666 SimonYang223@163.com
 * @Date: 2022-05-07 20:09:53
 * @LastEditors: SimonCK666 SimonYang223@163.com
 * @LastEditTime: 2022-05-07 20:13:02
 * @FilePath: \golang-concept\L4_gofunc\func.go
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package main

import "fmt"

func sum(a int, b int) (ret int) {
	ret = a + b
	return ret
}

func compare(a int, b int) (max int) {
	if a > b {
		max = a
	} else {
		max = b
	}
	return max
}

func func_opt() {
	r := sum(1, 2)
	fmt.Printf("r: %v\n", r)

	max := compare(1, 2)
	fmt.Printf("max: %v\n", max)
}
